UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'OoYTZTaZy0KJVxzOfBXHex9PwuQ45XCYf3Qemu6grtk=' 
WHERE 
  key_id = '32405804c3009f43f9bca0caa18e10c0150f5bbb0cd0e26bec9ca27b65275c05' 
  AND (
    token = 'OoYTZTaZy0KJVxzOfBXHex9PwuQ45XCYf3Qemu6grtk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017