UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XwUFDOJSnxDCGeF2+uQ8Nb+YkVhR8msain65RpurroI='
WHERE
key_id = '5c84cfdd96565aafafbeeb5277751c619a755aead0b0847402ba57729700aafb'
AND (
token = 'XwUFDOJSnxDCGeF2+uQ8Nb+YkVhR8msain65RpurroI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)