UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4DV9M1nacdA974Kl+v2AfLZmfh+W5yIwY2FnS/z3K1E=' 
WHERE 
  key_id = '67e56f5be8d148b6c77043bad2636492cbe7de7677961e7e63084f38b57c47bf' 
  AND (
    token = '4DV9M1nacdA974Kl+v2AfLZmfh+W5yIwY2FnS/z3K1E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016