UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bbCJs2Kn3QpZnG5RXe1+asrAdzdvy4KoFYyrp3cf5Xc='
WHERE
key_id = '94c5da68f8fd82d6cdd7e7a1b3a7ba5a929ecf83df84a6e6b384bec186902f1d'
AND (
token = 'bbCJs2Kn3QpZnG5RXe1+asrAdzdvy4KoFYyrp3cf5Xc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)