UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+whQA/mtzbh65oAbls9kzy4vjomMLkNhDZUKMzKdvVU=' 
WHERE 
  key_id = '29cb2c2f4a8c25d92bfb58e0dead2b24d96b22bb77e2d3364fa4e306ba8c8b99' 
  AND (
    token = '+whQA/mtzbh65oAbls9kzy4vjomMLkNhDZUKMzKdvVU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027