UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WxU25MIgAn3poYf9DcqQUzLzZmPol7DJZ9vtL+qVu04='
WHERE
key_id = '60212cc07602bcde9159115637033f3fca5d59cda79ebea5ccfd06d96ca2d13b'
AND (
token = 'WxU25MIgAn3poYf9DcqQUzLzZmPol7DJZ9vtL+qVu04='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)