UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nrIhy/TPQnwt1FG32V601YePfA+TpylO6ZsL7WOPjNA='
WHERE
key_id = '93e6e9d7540c00a33fdf33b2c753d9f42ff9f86a7d580c862d980e81ebf09c83'
AND (
token = 'nrIhy/TPQnwt1FG32V601YePfA+TpylO6ZsL7WOPjNA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)