UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'i/riIEq9J8z/XiiNnEGoG9kQSGVimt90uDUosoXveOw='
WHERE
key_id = '5df4e092bf567ee4b6611bd4b3f5a37ef502ced1cc3b14bfe302c3b50748ff9c'
AND (
token = 'i/riIEq9J8z/XiiNnEGoG9kQSGVimt90uDUosoXveOw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)