UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's1zrkZKxkBvyoqJQY/VHAXXk6vcO1C3Wf1fKXIoozxk='
WHERE
key_id = '6b7c16d15d8d37778612f9d94635b2c2b2cc922652aa75b772f78c36fbf19520'
AND (
token = 's1zrkZKxkBvyoqJQY/VHAXXk6vcO1C3Wf1fKXIoozxk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)