UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '13NedLUuq7hXS5/37QexLV7kHyBd/Qfcd74Zj7xG8Vo='
WHERE
key_id = '6a77a15a72e7b1f63da98aed4c08116d024f90e5f2bea0acaa920c5c51deca5b'
AND (
token = '13NedLUuq7hXS5/37QexLV7kHyBd/Qfcd74Zj7xG8Vo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)