UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'voFiFpHwVKBtV38XILdor90K8I5bDvba9YIGXQ2M7Ys='
WHERE
key_id = '236f09190108a980dfd65e8ccfda90c564c7f403e40a55ac348879e9b20cd230'
AND (
token = 'voFiFpHwVKBtV38XILdor90K8I5bDvba9YIGXQ2M7Ys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)