UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eIQUwfeQFitu5xrGhcZoLGTGD9Zszx+jXPo7VtNx7Yg='
WHERE
key_id = '69daf0221e821d57c96be878643372f512fb2c3763f358805d12b4bfaf8e73ad'
AND (
token = 'eIQUwfeQFitu5xrGhcZoLGTGD9Zszx+jXPo7VtNx7Yg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)