UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FMLI4iol0Y5C6ldh6fDTvMHnJ862R5WqqtK9cZ8Qbtc='
WHERE
key_id = '094aca6e1cd5d88dc4d4cf5a7a2c378f8ab33713af7c2de20b3bc8e165133319'
AND (
token = 'FMLI4iol0Y5C6ldh6fDTvMHnJ862R5WqqtK9cZ8Qbtc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)