UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'met4I3hSt7E02shY1xlaHlR79phDhW9B+RkWhNppXjU='
WHERE
key_id = '4a108a3c685e4f18ee176ee337fb3a14b6ace563f8d2b0327999ea55636ca2ac'
AND (
token = 'met4I3hSt7E02shY1xlaHlR79phDhW9B+RkWhNppXjU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)