UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RWMBUOmLXSL27lelJOPzq7qkyHhfuUqi6vBeFhXgWWY='
WHERE
key_id = 'a780da9770d9a7d2dfed98af2028f777ebc841401f4cfdfc09b3eff7805e1eba'
AND (
token = 'RWMBUOmLXSL27lelJOPzq7qkyHhfuUqi6vBeFhXgWWY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)