UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZC25fH5EJieY+cl7dF72AJQ0JDYXhrDPPS3/71C3CvY='
WHERE
key_id = '42cbfbadfda696a4a6592069744c2dda3e4ba6e05c0925dcf10a3703b6f7bce8'
AND (
token = 'ZC25fH5EJieY+cl7dF72AJQ0JDYXhrDPPS3/71C3CvY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)