UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'niWeA1m7EBw9yVHdk4N21u2aRA/Ia4PG8FJvaEbqA/Q='
WHERE
key_id = 'c841d64d15072412bebe1524530933754355316af8c8848b9acdc345e874a515'
AND (
token = 'niWeA1m7EBw9yVHdk4N21u2aRA/Ia4PG8FJvaEbqA/Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)