UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'VLmvtjrfYBqWlNEhS++QLsnvhEGLIEyZD3m6L1prdGY=' 
WHERE 
  key_id = 'bd3b28f51556d7c035c3a9e73affbd3af0df0077e7da02870d2e41f4d2c1690d' 
  AND (
    token = 'VLmvtjrfYBqWlNEhS++QLsnvhEGLIEyZD3m6L1prdGY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031