UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vFmLfrTo+f5eo1c80b1EuOOCZ/mQs+50v2mwxMUpzKc='
WHERE
key_id = '4f40f4de725d18d45e75d1b75d24e6f657a298cf4f669c429aeadafd25348f6b'
AND (
token = 'vFmLfrTo+f5eo1c80b1EuOOCZ/mQs+50v2mwxMUpzKc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)