UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ev77ZI15fRLeNAtkcorGX6HicLLoYWtL6S7IzQ5jVOM='
WHERE
key_id = 'fbb2c544ccaaf3354c82fcb4a1cd9df0be4ac2d17cde217ac66b6fa0423f7a14'
AND (
token = 'Ev77ZI15fRLeNAtkcorGX6HicLLoYWtL6S7IzQ5jVOM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)