UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'w/Y359Lw9oMgGnx/MBNdWqnN7S9gyB2QLb7EHqgMbvI='
WHERE
key_id = '051366dab3fdb577a0e311a5c83a9cc6b8e94e9990d5d618de7eaeefd3be950c'
AND (
token = 'w/Y359Lw9oMgGnx/MBNdWqnN7S9gyB2QLb7EHqgMbvI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)