UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zbMNoNgS2wj46yXVPz7YIJeeEI7IFRcIlwvw/AqMVzA=' 
WHERE 
  key_id = '74c8d8444fdc22abc3176a44c93fea46cbecd86566bc8acfaf3640a79b3b698e' 
  AND (
    token = 'zbMNoNgS2wj46yXVPz7YIJeeEI7IFRcIlwvw/AqMVzA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034