UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ck1++uUzQ/f96g5a8D4af06nPvZmj9rW6Sjs0e5hR4Q='
WHERE
key_id = '83aa70fd8925d59d370778470106a60fbb83db4ec3ca4059bc8e8ccf661fdab6'
AND (
token = 'Ck1++uUzQ/f96g5a8D4af06nPvZmj9rW6Sjs0e5hR4Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)