UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iOobsE4zPtiX+t4eLRKXOkOnmEj9rlnNL7dsd1PzxMI='
WHERE
key_id = '53d4347fbdf82371cd597352f0b0792abe38afaafdb82ae76e17a852509db844'
AND (
token = 'iOobsE4zPtiX+t4eLRKXOkOnmEj9rlnNL7dsd1PzxMI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)