UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'klLG/auR4GPWVojI5nXEf6vyglrv8jVVNK8vbnF/iIU=' 
WHERE 
  key_id = '83dbe3a01a009162fa615a145918f73ab7a0a117787c08f140f308f2402f0f1a' 
  AND (
    token = 'klLG/auR4GPWVojI5nXEf6vyglrv8jVVNK8vbnF/iIU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031