UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PUMO+Myetrf47iLBShVnrCNKXFU1vhIYsUTlYehT5gE='
WHERE
key_id = 'a5abfb26b2ac6b346a6a5ac52d7511676ae174e8a927ef1077f63c6d8b3a88de'
AND (
token = 'PUMO+Myetrf47iLBShVnrCNKXFU1vhIYsUTlYehT5gE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)