UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cba/0amg3tWfUJuZ8uDYd9UyiUDD0A6Orykhm3SO10s='
WHERE
key_id = '41d9833350c6c0120af0e3d0ce21d2c14c29ac95a2906ff4b7c56dfdb43e2814'
AND (
token = 'cba/0amg3tWfUJuZ8uDYd9UyiUDD0A6Orykhm3SO10s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)