UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fTEvbcgjLyxXbpqs+qqiWgstsF5FZg2LcqbTJEvOUhg='
WHERE
key_id = '65de17866cebcf1e5e34df34338c1e16343c179ea78a58a141aee3ef0023e730'
AND (
token = 'fTEvbcgjLyxXbpqs+qqiWgstsF5FZg2LcqbTJEvOUhg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)