UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oehF8ugIYGMO2aIn4JqPYvrkw+VleUELx2G8IzkJ2pQ='
WHERE
key_id = '098c95f57613606074b76ce3779aca5b19be4920393f02f02e69ae2741ed756f'
AND (
token = 'oehF8ugIYGMO2aIn4JqPYvrkw+VleUELx2G8IzkJ2pQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)