UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '++U+ODAIAclB6eyoQ5D/uKBuQe/wF92DbT2rHOiteD8=' 
WHERE 
  key_id = '8c4ac1c31f8b4ae617234d9403fc8b63e615b0cce1fb1f7b79e21da06a41137a' 
  AND (
    token = '++U+ODAIAclB6eyoQ5D/uKBuQe/wF92DbT2rHOiteD8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039