UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0PVFLqc8+YhMkVva4e4WG1so6Rw1FJzeePs6ZoojS7c=' 
WHERE 
  key_id = '91ffb73ce32da66084ab0a5ae13fe66e7ce28ff451fcdb540e3d07237fcd515b' 
  AND (
    token = '0PVFLqc8+YhMkVva4e4WG1so6Rw1FJzeePs6ZoojS7c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037