UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Y7oOA2kfz4hvgH/MrLjG1P7Ztxf2bRMmkbAcqK/kvO8='
WHERE
key_id = '55fc055edc170196136437cc815c7711fbc42954aedf01cfb441f538785455fc'
AND (
token = 'Y7oOA2kfz4hvgH/MrLjG1P7Ztxf2bRMmkbAcqK/kvO8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)