UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bDWDFmXB6gJHYNHGbcIO7P4/azmPAnA9CJZ1mURIo/4='
WHERE
key_id = 'c88e0e2e0ee3f9c199384bbd1526f7688436041bc88c4cb7e82247646205d932'
AND (
token = 'bDWDFmXB6gJHYNHGbcIO7P4/azmPAnA9CJZ1mURIo/4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)